"""
@Name:histBybar.py
@Auth:YJ
@Date:2023/11/4
"""
from matplotlib import pyplot as plt

interva1 = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 60, 90]
width = [5, 5, 5, 5, 5, 5, 5, 5, 5, 15, 30, 60]
quantity = [836, 2737, 3723, 3926, 3596, 1438, 3273, 642, 824, 613, 215, 47]
# 设置图片大小
plt.figure(figsize=(20, 8), dpi=80)

plt.bar(range(len(quantity)), quantity, width=1)

# 设置x轴刻度
_x = [i - 0.5 for i in range(13)]  # x轴刻度往左移0.5
_xtick_labels = interva1 + [150]
plt.xticks(_x, _xtick_labels)
plt.grid()
plt.show()
